/**
  ******************************************************************************
  * @file           : PWM_LED.h
  * @brief          : Header for PWM_LED.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
 */
/* Define to prevent recursive inclusion -------------------------------------*/


#ifndef __PWM_LED_H
#define __PWM_LED_H

#ifdef __cplusplus
extern "C" {
#endif

 
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
#include <stdio.h>
#include "cmsis_os.h"
#include "i2c.h"
#include "tim.h"
#include "usart.h"
#include "gpio.h"

/* Private defines -----------------------------------------------------------*/


typedef enum {
	Dim=10,
	LOW=30,
	MODERATE=50,
	HIGH=70,
	VERY_HIGH=90
}LED_Brightness_t;

typedef enum {	
    SPEED_LOW,
	SPEED_MODERATE,
	SPEED_HIGH
}LED_Speed_t;


typedef struct {
	LED_Speed_t Speed;
	LED_Brightness_t Brightness;
}LED_HandleTypeDef;

volatile LED_HandleTypeDef  hled1;
/* Exported functions prototypes ---------------------------------------------*/
void LED_init(void);
LED_Brightness_t get_LED_brightness(volatile LED_HandleTypeDef hled);
LED_Speed_t get_LED_speed(volatile LED_HandleTypeDef *hled);
void LED_adjust_brightness(volatile LED_HandleTypeDef hled);
void LED_adjust_speed(volatile LED_HandleTypeDef *hled,LED_Speed_t Expected_Speed);

/* Private defines -----------------------------------------------------------*/




#ifdef __cplusplus
}
#endif

#endif /* __PWM_LED_H */